<template>

<div class="box">
  <img id="img" src="https://s1.ax1x.com/2022/11/14/zAE7EF.jpg" alt="">
  <A a="123" title="标题" />
  <!-- 转换后base64显示 -->
  <img :src="src" alt="">
<div>
  {{$filters.format('自定义函数')}}
</div>
</div>

</template>
<script setup lang='ts'>
// import A from '/src/components/hooks/A.vue'
import A from '@/components/hooks/A.vue'
import useBase64 from '../utils/hooks'
let src = ref<string>('')
useBase64({
  el: '#img'
}).then(({baseUrl})=>{
  src.value = baseUrl
})
</script>
<style scoped lang='less'>
:deep(.box) {
  width: 100%;
  height: 100%;

}
</style>